//
// Created by guanyicheng on 2021/11/12.
//

#include <iostream>

using namespace std;

int main() {

    int input;
    while (cin >> input) {
        int a = 1, b = 1;
        if (input < 3) {
            cout << 1 << endl;
            continue;
        }
        for(int i = 2; i < input; ++i) {
            int temp = b;
            b = a + b;
            a = temp;
        }
        cout << b << endl;
    }
}